<template>
    <iframe class="iframe" ref="nowIframe" />
</template>

<script>
export default {
  name: 'iframeTarget',
  props: {
    pageData: Array
  },
  data () {
    return {
      hoverFlag: false
    }
  },
  watch: {
    
  },
  methods: {
   
  },
  mounted () {
    let html = this.$utils.renderHtml(this.pageData)
   
    setTimeout(() => {
      this.$refs.nowIframe.contentWindow.document.write(html)
      this.$refs.nowIframe.contentWindow.document.close();
    }, 0)
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="stylus" scoped>
  .iframe
    height 100vh;
    border none;
    outline: none;
    width 100%
    position relative
    z-index 1
</style>
